\(\int \frac {\log (c (d+e x^2)^p)}{x (f+g x^2)} \, dx\) [341]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (warning: unable to verify)
   Fricas [F]
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 25, antiderivative size = 119 \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\frac {\log \left (-\frac {e x^2}{d}\right ) \log \left (c \left (d+e x^2\right )^p\right )}{2 f}-\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 f}-\frac {p \operatorname {PolyLog}\left (2,-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 f}+\frac {p \operatorname {PolyLog}\left (2,1+\frac {e x^2}{d}\right )}{2 f} \]

[Out]

1/2*ln(-e*x^2/d)*ln(c*(e*x^2+d)^p)/f-1/2*ln(c*(e*x^2+d)^p)*ln(e*(g*x^2+f)/(-d*g+e*f))/f-1/2*p*polylog(2,-g*(e*
x^2+d)/(-d*g+e*f))/f+1/2*p*polylog(2,1+e*x^2/d)/f

Rubi [A] (verified)

Time = 0.14 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {2525, 36, 29, 31, 2463, 2441, 2352, 2440, 2438} \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=-\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 f}+\frac {\log \left (-\frac {e x^2}{d}\right ) \log \left (c \left (d+e x^2\right )^p\right )}{2 f}-\frac {p \operatorname {PolyLog}\left (2,-\frac {g \left (e x^2+d\right )}{e f-d g}\right )}{2 f}+\frac {p \operatorname {PolyLog}\left (2,\frac {e x^2}{d}+1\right )}{2 f} \]

[In]

Int[Log[c*(d + e*x^2)^p]/(x*(f + g*x^2)),x]

[Out]

(Log[-((e*x^2)/d)]*Log[c*(d + e*x^2)^p])/(2*f) - (Log[c*(d + e*x^2)^p]*Log[(e*(f + g*x^2))/(e*f - d*g)])/(2*f)
 - (p*PolyLog[2, -((g*(d + e*x^2))/(e*f - d*g))])/(2*f) + (p*PolyLog[2, 1 + (e*x^2)/d])/(2*f)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 2440

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + c*e*(x/g)])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2441

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[Log[e*((f + g
*x)/(e*f - d*g))]*((a + b*Log[c*(d + e*x)^n])/g), x] - Dist[b*e*(n/g), Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2463

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((h_.)*(x_))^(m_.)*((f_) + (g_.)*(x_)^(r_.))^(q
_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, (h*x)^m*(f + g*x^r)^q, x], x] /; FreeQ[{a,
 b, c, d, e, f, g, h, m, n, p, q, r}, x] && IntegerQ[m] && IntegerQ[q]

Rule 2525

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.)*((f_) + (g_.)*(x_)^(s_))^(r_.),
 x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(f + g*x^(s/n))^r*(a + b*Log[c*(d + e*x)^p])^q,
x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, g, m, n, p, q, r, s}, x] && IntegerQ[r] && IntegerQ[s/n] && Intege
rQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0])

Rubi steps \begin{align*} \text {integral}& = \frac {1}{2} \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x (f+g x)} \, dx,x,x^2\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {\log \left (c (d+e x)^p\right )}{f x}-\frac {g \log \left (c (d+e x)^p\right )}{f (f+g x)}\right ) \, dx,x,x^2\right ) \\ & = \frac {\text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{x} \, dx,x,x^2\right )}{2 f}-\frac {g \text {Subst}\left (\int \frac {\log \left (c (d+e x)^p\right )}{f+g x} \, dx,x,x^2\right )}{2 f} \\ & = \frac {\log \left (-\frac {e x^2}{d}\right ) \log \left (c \left (d+e x^2\right )^p\right )}{2 f}-\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 f}-\frac {(e p) \text {Subst}\left (\int \frac {\log \left (-\frac {e x}{d}\right )}{d+e x} \, dx,x,x^2\right )}{2 f}+\frac {(e p) \text {Subst}\left (\int \frac {\log \left (\frac {e (f+g x)}{e f-d g}\right )}{d+e x} \, dx,x,x^2\right )}{2 f} \\ & = \frac {\log \left (-\frac {e x^2}{d}\right ) \log \left (c \left (d+e x^2\right )^p\right )}{2 f}-\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 f}+\frac {p \text {Li}_2\left (1+\frac {e x^2}{d}\right )}{2 f}+\frac {p \text {Subst}\left (\int \frac {\log \left (1+\frac {g x}{e f-d g}\right )}{x} \, dx,x,d+e x^2\right )}{2 f} \\ & = \frac {\log \left (-\frac {e x^2}{d}\right ) \log \left (c \left (d+e x^2\right )^p\right )}{2 f}-\frac {\log \left (c \left (d+e x^2\right )^p\right ) \log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )}{2 f}-\frac {p \text {Li}_2\left (-\frac {g \left (d+e x^2\right )}{e f-d g}\right )}{2 f}+\frac {p \text {Li}_2\left (1+\frac {e x^2}{d}\right )}{2 f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.77 \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\frac {\log \left (c \left (d+e x^2\right )^p\right ) \left (\log \left (-\frac {e x^2}{d}\right )-\log \left (\frac {e \left (f+g x^2\right )}{e f-d g}\right )\right )-p \operatorname {PolyLog}\left (2,\frac {g \left (d+e x^2\right )}{-e f+d g}\right )+p \operatorname {PolyLog}\left (2,1+\frac {e x^2}{d}\right )}{2 f} \]

[In]

Integrate[Log[c*(d + e*x^2)^p]/(x*(f + g*x^2)),x]

[Out]

(Log[c*(d + e*x^2)^p]*(Log[-((e*x^2)/d)] - Log[(e*(f + g*x^2))/(e*f - d*g)]) - p*PolyLog[2, (g*(d + e*x^2))/(-
(e*f) + d*g)] + p*PolyLog[2, 1 + (e*x^2)/d])/(2*f)

Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.23 (sec) , antiderivative size = 420, normalized size of antiderivative = 3.53

method result size
parts \(\frac {\ln \left (c \left (e \,x^{2}+d \right )^{p}\right ) \ln \left (x \right )}{f}-\frac {\ln \left (c \left (e \,x^{2}+d \right )^{p}\right ) \ln \left (g \,x^{2}+f \right )}{2 f}-e p \left (\frac {\frac {\ln \left (x \right ) \left (\ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )+\ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )\right )}{e}+\frac {\operatorname {dilog}\left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )+\operatorname {dilog}\left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{e}}{f}-\frac {\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (e \,\textit {\_Z}^{2}+d \right )}{\sum }\left (\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \ln \left (g \,x^{2}+f \right )-\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \left (\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )+\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )}{2 f e}\right )\) \(420\)
risch \(\frac {\ln \left (\left (e \,x^{2}+d \right )^{p}\right ) \ln \left (x \right )}{f}-\frac {\ln \left (\left (e \,x^{2}+d \right )^{p}\right ) \ln \left (g \,x^{2}+f \right )}{2 f}-\frac {p \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{f}-\frac {p \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{f}-\frac {p \operatorname {dilog}\left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{f}-\frac {p \operatorname {dilog}\left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{f}+\frac {p \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (e \,\textit {\_Z}^{2}+d \right )}{\sum }\left (\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \ln \left (g \,x^{2}+f \right )-\ln \left (x -\underline {\hspace {1.25 ex}}\alpha \right ) \left (\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )+\ln \left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =1\right )}\right )-\operatorname {dilog}\left (\frac {\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )-x +\underline {\hspace {1.25 ex}}\alpha }{\operatorname {RootOf}\left (e \,\textit {\_Z}^{2} g +2 \underline {\hspace {1.25 ex}}\alpha \textit {\_Z} g e -d g +e f , \operatorname {index} =2\right )}\right )\right )\right )}{2 f}+\left (\frac {i \pi \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2}}{2}-\frac {i \pi \,\operatorname {csgn}\left (i \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i \pi {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{3}}{2}+\frac {i \pi {\operatorname {csgn}\left (i c \left (e \,x^{2}+d \right )^{p}\right )}^{2} \operatorname {csgn}\left (i c \right )}{2}+\ln \left (c \right )\right ) \left (\frac {\ln \left (x \right )}{f}-\frac {\ln \left (g \,x^{2}+f \right )}{2 f}\right )\) \(555\)

[In]

int(ln(c*(e*x^2+d)^p)/x/(g*x^2+f),x,method=_RETURNVERBOSE)

[Out]

ln(c*(e*x^2+d)^p)/f*ln(x)-1/2*ln(c*(e*x^2+d)^p)/f*ln(g*x^2+f)-e*p*(2/f*(1/2*ln(x)*(ln((-e*x+(-d*e)^(1/2))/(-d*
e)^(1/2))+ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2)))/e+1/2*(dilog((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+dilog((e*x+(-d*e
)^(1/2))/(-d*e)^(1/2)))/e)-1/2/f/e*sum(ln(x-_alpha)*ln(g*x^2+f)-ln(x-_alpha)*(ln((RootOf(_Z^2*e*g+2*_Z*_alpha*
e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))+ln((RootOf(_Z^2*e*g+2*_Z*_alp
ha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)))-dilog((RootOf(_Z^2*e*g+2*
_Z*_alpha*e*g-d*g+e*f,index=1)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=1))-dilog((RootOf(_Z^2*
e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)-x+_alpha)/RootOf(_Z^2*e*g+2*_Z*_alpha*e*g-d*g+e*f,index=2)),_alpha=RootOf
(_Z^2*e+d)))

Fricas [F]

\[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\int { \frac {\log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{{\left (g x^{2} + f\right )} x} \,d x } \]

[In]

integrate(log(c*(e*x^2+d)^p)/x/(g*x^2+f),x, algorithm="fricas")

[Out]

integral(log((e*x^2 + d)^p*c)/(g*x^3 + f*x), x)

Sympy [F(-1)]

Timed out. \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\text {Timed out} \]

[In]

integrate(ln(c*(e*x**2+d)**p)/x/(g*x**2+f),x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.33 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.18 \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=-\frac {1}{2} \, e p {\left (\frac {2 \, \log \left (\frac {e x^{2}}{d} + 1\right ) \log \left (x\right ) + {\rm Li}_2\left (-\frac {e x^{2}}{d}\right )}{e f} - \frac {\log \left (g x^{2} + f\right ) \log \left (-\frac {e g x^{2} + e f}{e f - d g} + 1\right ) + {\rm Li}_2\left (\frac {e g x^{2} + e f}{e f - d g}\right )}{e f}\right )} - \frac {1}{2} \, {\left (\frac {\log \left (g x^{2} + f\right )}{f} - \frac {\log \left (x^{2}\right )}{f}\right )} \log \left ({\left (e x^{2} + d\right )}^{p} c\right ) \]

[In]

integrate(log(c*(e*x^2+d)^p)/x/(g*x^2+f),x, algorithm="maxima")

[Out]

-1/2*e*p*((2*log(e*x^2/d + 1)*log(x) + dilog(-e*x^2/d))/(e*f) - (log(g*x^2 + f)*log(-(e*g*x^2 + e*f)/(e*f - d*
g) + 1) + dilog((e*g*x^2 + e*f)/(e*f - d*g)))/(e*f)) - 1/2*(log(g*x^2 + f)/f - log(x^2)/f)*log((e*x^2 + d)^p*c
)

Giac [F]

\[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\int { \frac {\log \left ({\left (e x^{2} + d\right )}^{p} c\right )}{{\left (g x^{2} + f\right )} x} \,d x } \]

[In]

integrate(log(c*(e*x^2+d)^p)/x/(g*x^2+f),x, algorithm="giac")

[Out]

integrate(log((e*x^2 + d)^p*c)/((g*x^2 + f)*x), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {\log \left (c \left (d+e x^2\right )^p\right )}{x \left (f+g x^2\right )} \, dx=\int \frac {\ln \left (c\,{\left (e\,x^2+d\right )}^p\right )}{x\,\left (g\,x^2+f\right )} \,d x \]

[In]

int(log(c*(d + e*x^2)^p)/(x*(f + g*x^2)),x)

[Out]

int(log(c*(d + e*x^2)^p)/(x*(f + g*x^2)), x)